<div class="in_header">
    <div class="menuH">
        <div class="menuHead">
            <ul>
                <li>
                    <ul>
                        <?php if(!empty($numProduct) && $numProduct > 0) {?>
                        <li class="QL">
                            <a href="<?php echo urlAlias('gio-hang');?>">Giỏ hàng (<?php echo $numProduct;?>)</a>
                        </li>
                        <?php }?>
                       
                        <li class="CS"><a href="<?php echo urlAlias("cham-soc-khach-hang");?>">Chăm sóc khách hàng</a></li>
                    </ul>
                </li>
                <li class="menu_a01">
                    <ul>
                    <?php if (!empty($logged_in)) { ?>
                        <li class="first"><a href="<?php echo base_url("profile/index/{$logged_in['id']}"); ?>">Xin chào <?php echo $logged_in['lb_full_name']; ?></a></li>
                        <li><a href="<?php echo base_url('logout'); ?>">Thoát</a></li>
                     <?php }else{ ?>
                     	<li class="first"><a href="<?php echo urlAlias("dang-ky");?>">Đăng ký</a></li>
                        <li><a class="login-window" href="#login-box">Đăng nhập</a></li>
                        <li><a href="<?php echo $loginUrl;?>">Facebook Login</a></li>
                     <?php } ?>
                    </ul>
                </li>
            </ul>
        </div><!--menuHead-->
    </div><!--menuH-->
    <div class="header_main">
    	<div class="logo">
            <a href="<?php echo base_url();?>"><img src="<?php echo base_url()?>templates/images/logo.png" width="250" height="64" alt="Logo" /></a>
        </div>
        <div class="header_right">
            <div class="quick_link">
                    <span class="hdTs">
                        <img src="<?php echo base_url('templates/images/hd_ts.png');?>">
                    </span>
                    <a class="hdTt" href="<?php echo base_url("phuong-thuc-thanh-toan-beyeu.html");?>"><img src="<?php echo base_url('templates/images/hd_tt.png')?>"></a>
            </div>
            <div class="frm_search">
                <form action="<?php echo base_url();?>index.php?c=search&m=index" method="post" data-tip="Nhập từ khóa để tìm" data-url="http://beyeu.com/searchautocomplete/ajax/get/" >
                    <input name="q" class="ip" type="text" placeholder="Gõ từ khóa cần tìm">
                    <input class="btnSearch" type="submit" value="Tìm kiếm">
                </form>
            </div>
        </div>
    </div>
    <div class="menuT">
        <div class="menuTo">
            <div class="menuTop">
                <ul>
                   
                    <?php if ($menuProductCate) { ?>

                        <?php foreach ($menuProductCate as $category) { ?>

                            <li>

                                <a href="<?php echo urlAlias($category->name_alias); ?>"><?php echo $category->name; ?></a>
                                <?php if (!empty($category->children)) { ?>
                                    <?php for ($i = 0; $i < count($category->children);) { ?>

                                        <ul>

                                            <?php $j = $i + ceil(count($category->children) / 1); ?>

                                            <?php for (; $i < $j; $i++) { ?>

                                                <?php if (isset($category->children[$i])) { ?>

                                                    <li><a href="<?php echo urlAlias($category->children[$i]->name_alias); ?>"><?php echo $category->children[$i]->name; ?></a></li>

                                                <?php } ?>

                                            <?php } ?>

                                        </ul>
                                
                                    <?php } ?>
                                <?php } ?>
                            </li>

                        <?php }#foreach?>

                    <?php }#endif?>
                            <li class="last"><a href="<?php echo urlAlias('san-pham-khuyen-mai'); ?>">Khuyến mãi</a></li>
                </ul>
            </div><!--menuTop-->
        </div><!--menuTo-->
    </div><!--menuT-->
</div><!--in_header-->